package com.wu.dao.weixin.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wu.entity.utils.DateUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

@Data
@Schema(description = "用户")
public class WeixinGzUserVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    private String id;

    @Schema(description = "用户名", required = true)
    @NotBlank(message = "用户名不能为空")
    private String nickname;

    @Schema(description = "性别 0：男   1：女   2：未知", required = true)
    @Range(min = 0, max = 2, message = "性别不正确")
    private String sex;


    @Schema(description = "手机号", required = true)
    @NotBlank(message = "手机号不能为空")
    private String mobile;

    @Schema(description = "状态 0：停用    1：正常", required = true)
    @Range(min = 0, max = 1, message = "用户绑定状态不正确")
    private String bindStatus;

    @Schema(description = "关注时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date subscribetime;

    @Schema(description = "地址")
    private String address;
}